<?php
namespace Home\Common;

class LevelLog extends Mysql{
	
	function getLevelLog($date){
		$thedate = session("mog_thedate");
		$result	=	$this->mysql->prepare("select level,count(distinct(userid)) from mog_user_info 
		where createtime = \"$date\" and date = \"$thedate\" group by level");
		$result->execute();
		
		$arResult	=	array();
		while($row	=	$result->fetch(\PDO::FETCH_ASSOC)){
			$arResult[$row['level']]	=	$row['count(distinct(userid))'];
		}
		
		return $arResult;
	}

}
?>
